package com.naver.multimap;

import java.util.Collection;
import java.util.Iterator;

import com.google.common.collect.Multimap;
import com.google.common.collect.TreeMultimap;

public class MultiMapTest {
	public static void main(String[] args) {
		Multimap<Integer, Integer> m = TreeMultimap.create();
	
		m.put(1, 1);
		m.put(2, 2);
		m.put(3, 3);
		m.put(3, 5);
		m.put(3, 5);

		m.remove(3, 3);
		
		Collection<Integer> collection = m.get(3);
		Iterator<Integer> iterator = collection.iterator();

		while (iterator.hasNext()) {
			Integer next = iterator.next();
			System.out.println(next);
		}
	}
}
